completing-read-multiple: Fix support for ":" as separator
authorDmitry Gutov <dmitry@gutov.dev>
Sun, 2 Mar 2025 03:13:14 +0000 (05:13 +0200)
committerDmitry Gutov <dmitry@gutov.dev>
Sun, 2 Mar 2025 03:13:59 +0000 (05:13 +0200)
* lisp/emacs-lisp/crm.el (completing-read-multiple):
Do not search for separators inside the prompt (bug#76461).

lisp/emacs-lisp/crm.el

index a371a8e14de981dbb82f2ebcb0fc3156838a49f4..d442d74f0303357211ccb8dee91084446a9eaa26 100644 (file)
@@ -253,7 +253,9 @@ with empty strings removed."
           (setq-local completion-list-insert-choice-function
                       (lambda (_start _end choice)
                         (let* ((beg (save-excursion
-                                      (if (search-backward-regexp crm-separator nil t)
+                                      (if (search-backward-regexp crm-separator
+                                                                  (field-beginning)
+                                                                  t)
                                           (1+ (point))
                                         (minibuffer-prompt-end))))
                                (end (save-excursion